Put them on and look at this applet. Possibly there would be a stereo effect (or possibly not). I get a mild effect.
The Random
class
creates an object that outputs random integers.
For example:
Random randNum = new Random(); // create a Random number object . . . int someInt = Math.abs( randNum.nextInt() )%200 // someInt gets // a number from 0 to 199
The object referred to by randNum
has a method nextInt()
that will return an int randomly selected from the entire range of ints,
negative and positive.
Math.abs()
can be used to make the returned int postive.
Doing remainder division by 200 on that gives us an int 0 ... 199.
Say that you wanted to draw 1000 circles of radius 5 at random locations on the screen. What would you do?